HAL LPTIM function migration ¶
This section provides information about the HAL LPTIM function migration.
HAL LPTIM start counter ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_Counter_Start(LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_Start(hal_lptim_handle_t *hlptim);
|
HAL LPTIM start counter with interrupt ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_Counter_Start_IT(LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_Start_IT(hal_lptim_handle_t *hlptim);
|
HAL LPTIM stop counter ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_Counter_Stop(LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_Stop(hal_lptim_handle_t *hlptim);
|
HAL LPTIM stop with interrupt ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_Counter_Stop_IT(LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_Stop_IT(hal_lptim_handle_t *hlptim);
|
HAL LPTIM read auto-reload value ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_ReadAutoReload(const LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_GetPeriod(const hal_lptim_handle_t *hlptim);
|
HAL LPTIM read captured value ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_ReadCapturedValue(const LPTIM_HandleTypeDef *hlptim,
uint32_t Channel);
|
HAL_LPTIM_IC_ReadChannelCapturedValue(const hal_lptim_handle_t *hlptim,
hal_lptim_channel_t channel);
|
HAL LPTIM read counter value ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_ReadCounter(const LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_GetCounter(const hal_lptim_handle_t *hlptim);
|
HAL LPTIM get state ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_LPTIM_GetState(const LPTIM_HandleTypeDef *hlptim);
|
HAL_LPTIM_GetState(const hal_lptim_handle_t *hlptim);
Note
In HAL2, a new API called
|
Related concept: Revised and optimized HAL state machine